<?php

if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class mod_master extends CI_Model {
	function __construct() {
		parent::__construct();
	}

	function duser($param='',$filter='0'){
		if($filter=='0'){
			$filter=" nmuser like '%$param%' or nama_lengkap like '%$param%' limit 100 ";
		}else{
			$filter=" nmuser='$param' ";		
		}

        $query = $this->db->query(" select * from muser where  $filter ");  
		$hasil =$query->result();		
		return $hasil;
	}
	
	function mskpd(){
		$this->db->select('*');
		$this->db->from('mskpd');
		$this->db->order_by('nm_skpd','asc');
		$query = $this->db->get();
		$hasil =$query->result();		
		return $hasil;
	}

}
?>